<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.note.pojo.Notetype" %>
<%@include file="/jsp/common/head.jsp"%>
    <%

    java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    java.util.Date currentTime = new java.util.Date();//得到当前系统时间

    String str_date1 = formatter.format(currentTime); //将日期时间格式化
        List<Notetype> typelist = (List<Notetype>) request.getAttribute("typelist");
    %>
<div class="right">
    <div class="location">
        <strong>你现在所在的位置是:</strong>
        <span>博客编写页面</span>
    </div>
<form action="${pageContext.request.contextPath}/savenote" method="post">
    <input type="hidden" name="userid" value="1">
    标题:<input type="text" name="title" required/>&nbsp;&nbsp;&nbsp;
    类别:<select name="kind">
    <option value="-1">...</option>
    <%
        for (Notetype notetype : typelist) {

    %>
    <option value="<%=notetype.getTypeid()%>"><%=notetype.getTypename()%></option>
    <%
        }
    %>
</select>&nbsp;&nbsp;&nbsp;
    时间:<input type="text" name="time" value="<%=str_date1%>">
<%--    <script id="content" name="content" type="text/plain"></script>--%>
    <textarea id="content" name="content" style="height: 370px;width: 100%" required></textarea>
    <input type="submit" value="保存" style="height: 20px;width: 100px;font-size: 10px">
</form>
</div>
</section>
<%@include file="/jsp/common/foot.jsp" %>
<script type="text/javascript">
    $(function (){
        var ue = UE.getEditor("content");
        ue.setHeight(400);
    });
</script>
